<%@ page language="java" import="com.alibaba.fastjson.JSONObject" pageEncoding="UTF-8" %>
<%@ page import="weaver.conn.RecordSet" %>
<%@ page import="weaver.general.Util" %>
<%--获取流水号--%>
<%

    JSONObject jsonData = new JSONObject();
    String requestid = Util.null2String( request.getParameter( "requestid" ) );
    boolean sfygd = getCurrentNodeType(requestid);
    boolean sfyfs = hasSfyfs(requestid);
    jsonData.put( "sfygd", sfygd );
    jsonData.put( "sfyfs", sfyfs );
    out.print( jsonData.toJSONString() );

%>
<%!
    //判断考试统计台账明细考试流程是否归档
    public static boolean getCurrentNodeType( String requestid) {
        //0：创建 1：审批 2：提交 3：归档
        RecordSet rs = new RecordSet();
        rs.executeQuery( "select count(*) from workflow_requestbase where requestid=? and currentnodetype=3", requestid );
        rs.next();
        int count = Util.getIntValue(rs.getString(1));
        return count>0;
    }
    //判断考试统计台账明细是否已点击重新考试按钮
    public static boolean hasSfyfs( String requestid) {
        //0：是 1：否
        RecordSet rs = new RecordSet();
        rs.executeQuery("select count(*) from uf_kstjtz_dt1 where sjxq=? and sfyfs=0", requestid);
        rs.next();
        int count = Util.getIntValue(rs.getString(1));
        return count>0;
    }

%>